import Vue from 'vue'
import 'iview/dist/styles/iview.css'
import {
	Button,
	Card,
	Layout,
	Sider,
	Header,
	Content,
	Icon,
	Menu,
	MenuItem,
	MenuGroup,
	Submenu,
	Col,
	Row,
	Form,
	FormItem,
	Table,
	Tabs,
	TabPane,
	Alert,
	Steps,
	Step,
	Select,
	Option,
	RadioGroup,
	Radio,
	Input,
	CheckboxGroup,
	Checkbox,
	Message,
	Modal,
	Page,
	ButtonGroup,
	Tag,
	Breadcrumb,
	BreadcrumbItem,
	Switch,
	Avatar,
	Dropdown,
	DropdownItem,
	DropdownMenu,
	Tooltip,
	Tree
} from 'iview'

const iviewComponents = [
	Button,
	Card,
	Layout,
	Sider,
	Header,
	Content,
	Icon,
	Menu,
	MenuItem,
	MenuGroup,
	Submenu,
	Col,
	Row,
	Form,
	FormItem,
	Table,
	Tabs,
	TabPane,
	Alert,
	Steps,
	Step,
	Select,
	Option,
	RadioGroup,
	Radio,
	Input,
	CheckboxGroup,
	Checkbox,
	Message,
	Modal,
	Page,
	ButtonGroup,
	Tag,
	Breadcrumb,
	BreadcrumbItem,
	Switch,
	Avatar,
	Dropdown,
	DropdownItem,
	DropdownMenu,
	Tooltip,
	Tree
]

iviewComponents.forEach(c => Vue.component(c.name, c))

Vue.prototype.$Message = Message
Vue.prototype.$Modal = Modal
